<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>第一个spingboot项目</title>
</head>
<body>
<p class="infos"></p>
 <script src="js/jquery.min.js"></script>
<script>

    $(function(){
        $.ajax({
            type:"post",
            url:"show",
            dataType:"json",
            success:callback,
            error:function(){
                alert("状态AJAX出错");
            }
        });
        function callback(data){
            if(data!=null){
                alert("有数据");
            }else{
                alert("无数据");
            }
        }
    });
</script>
</body>
</html>